<!DOCTYPE html>
<html lang="en">
  <head>
 [#include "/base/base.ftl"/]
  </head>
  <body>
  <section id="container" class="">
      <!--header start-->
      [#include "/base/header.ftl"/]
      <!--header end-->
      <!--sidebar start-->
      [#include "/base/left.ftl"/]
      <!--sidebar end-->
      <!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <!-- page start-->
              <section class="panel">
                   [#include "/base/crumbs.ftl"/]
                  <div class="panel-body">
                      <div class="adv-table editable-table ">
                          <div class="clearfix">
                          [@shiro.hasPermission name="/server_base/add"]
                              <div class="btn-group">
                                  <a id="editable-sample_new" class="btn btn-primary" href="${base}/server_base/add">
                                      Add New <i class="icon-plus"></i>
                                  </a>
                              </div>
                           [/@shiro.hasPermission]
                          </div>
                          <div class="space15"></div>
                           <div class="panel-body">
                              <section id="no-more-tables">
                                <table class="table table-bordered table-striped table-condensed cf">
                                  <thead class="cf">
                                  <tr>
                                      <th>服务机构编号编号</th>
                                      <th>创建时间</th>
                                      <th>机构名称</th>
                                      <th>信誉值</th>
                                      <th>操作</th>
                                  </tr>
                                  </thead>
                                  <tbody>
                                  [#if serverlist ?? ]
	                                  [#list serverlist as server]
	                                   <tr>
	                                      <td>${server.id}</td>
	                                      <td>[#if server.create_time ??]${server.create_time?datetime}[/#if]</td>
	                                      <td>${server.server_name}</td>
	                                      <td>
	                                      <form class="form-horizontal" action="${base}/server_base/updateSort" role="form">
	                                       	 <input value="${server.id}" type="hidden" class="spinner-input form-control" name ="id">
	                                       		<div class="input-group" style="width:150px;">
                                                      <input value="${server.sort}" type="text" class="spinner-input form-control" name ="sort" maxlength="8">
                                                      <div class="spinner-buttons input-group-btn">
                                                          <button type="submit" class="btn spinner-down btn-danger">
                                                              <i class="icon-repeat"></i>
                                                          </button>
                                                      </div>
                                                  </div>
                                 			</form>
	                                      </td>
	                                      <td>
	                                       [@shiro.hasPermission name="/depart/update"]<a type="button" href="${base}/server_base/update?id=${server.id}" class="btn btn-danger btn-sm"><i class="icon-refresh"></i> Update</a>[/@shiro.hasPermission]
	                                       &nbsp;&nbsp;
	                                       [@shiro.hasPermission name="/depart/delete"]<a type="button" href="${base}/server_base/delete?id=${server.id}" class="btn btn-warning btn-sm"><i class=" icon-trash"></i> Delete</a>[/@shiro.hasPermission]
	                                        [#if server.flag_open == 0]
	                                       	 [@shiro.hasPermission name="/system/authority/delete"]<a type="button" href="${base}/server_base/sdopOrOpen?id=${server.id}&type=1" class="btn btn-warning"><i class="icon-long-arrow-down"></i>禁用</a>[/@shiro.hasPermission]
	                                       [#else]
	                                       	 [@shiro.hasPermission name="/system/authority/delete"]<a type="button" href="${base}/server_base/sdopOrOpen?id=${server.id}&type=0" class="btn btn-success"><i class="icon-long-arrow-up"></i>开启</a>[/@shiro.hasPermission]
	                                       [/#if]
	                                      </td>
	                                  </tr>
	                                  [/#list]
                                  [/#if]
                              </tbody>
                              </table>
                               [#include "/base/page.ftl"/]
                              </section>
                          </div>
                      </div>
                  </div>
              </section>
              <!-- page end-->
          </section>
      </section>
      <!--main content end-->
      <!--footer start-->
      [#include "/base/footer.ftl"/]
      <!--footer end-->
  </section>
 	<script src="${base}/js/jquery-1.8.3.min.js"></script>
    <script src="${base}/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="${base}/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="${base}/js/jquery.scrollTo.min.js"></script>
    <script src="${base}/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script type="text/javascript" src="${base}/assets/data-tables/jquery.dataTables.js"></script>
    <script type="text/javascript" src="${base}/assets/data-tables/DT_bootstrap.js"></script>
    <script src="${base}/js/respond.min.js" ></script>
    <!--common script for all pages-->
    <script src="${base}/js/common-scripts.js"></script>
      <script src="${base}/js/editable-table.js"></script>
  </body>
</html>
